package com.swx.guard.api;

import com.swx.guard.service.SchedulingService;
import com.xj.starter.bean.ApiResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Ricky
 * @date 2020/12/3
 */
@Api(tags = {"aaa"})
@RequestMapping("/guard")
@RestController
public class GuardController {

    @Resource
    private SchedulingService schedulingService;

    @ApiOperation(value = "升级服务")
    @PostMapping("/update")
    public ApiResult<String> test() {
        schedulingService.updateAllServices();
        return ApiResult.success("操作成功");
    }
}
